feat: Phase 2 TUI function decomposition with orchestration pattern#10
Merged
TimelordUK merged 4 commits intomainfrom Aug 24, 2025
Merged
feat: Phase 2 TUI function decomposition with orchestration pattern#10TimelordUK merged 4 commits intomainfrom
TimelordUK merged 4 commits intomainfrom
Conversation
…pattern MAJOR REFACTORING ACHIEVEMENTS: - render_status_line: 534 → 20 lines (96% reduction) using orchestration - handle_command_input: 416 → 130 lines (69% reduction) with try_handle_* pattern - handle_results_input: 159 → ~120 lines with focused sub-functions - run_app: 195 → 10 lines (95% reduction) - pure orchestration ARCHITECTURAL IMPROVEMENTS: - All major functions now use clean dispatching to focused sub-functions - Extracted mode styling, data source display, buffer info, and help text - Added search state coordination (tactical fix for N key bug) - Eliminated dead code (update_vim_search_pattern) DESIGN PLANNING: - Created comprehensive centralized state management design - Identified root cause: state scattered across Buffer/VimSearchManager/ColumnSearch - Designed Redux-style solution for proper state coordination 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Created comprehensive state analysis documenting 57 set_mode() calls - Mapped state transition triggers and side effects - Designed shadow state pattern to run parallel to existing state - Avoids big bang migration by observing rather than replacing This sets foundation for gradual state management improvements without breaking existing functionality.
TimelordUK
added a commit
that referenced
this pull request
Nov 2, 2025
Implements DuckDB-style SELECT * EXCLUDE (columns...) syntax for cleaner column exclusion without manually listing all desired columns. Key Changes: - Parser: Added EXCLUDE token and parsing logic for * EXCLUDE (col1, col2, ...) - AST: New SelectItem::StarExclude variant with excluded_columns list - Query Engine: Expansion logic that filters out excluded columns at execution time - Examples: Complete demo file with security, performance, and readability use cases Features: ✓ Case-insensitive column matching ✓ Works with WHERE, ORDER BY, LIMIT, GROUP BY clauses ✓ Handles nonexistent columns gracefully (silently ignores) ✓ Table-qualified syntax support (future: table.* EXCLUDE) ✓ Multiple exclusions in single statement Benefits: - Security: Easy to exclude sensitive columns (passwords, SSNs, etc.) - Performance: Skip large BLOB/TEXT columns when not needed - Maintainability: New columns auto-included without query updates - Readability: Clearer intent than listing 50+ columns manually Implementation Notes: - No transformer needed - expansion happens in query engine - Reuses existing column resolution infrastructure - Pattern matches all SelectItem match arms for completeness - 10 files modified, comprehensive example suite added Examples: SELECT * EXCLUDE (password, created_at) FROM users; SELECT * EXCLUDE (eccentricity, albedo) FROM solar_system WHERE type = 'Planet'; Completes roadmap item #10 (SELECT * EXCLUDE) - v1.66.0 Next: SELECT * REPLACE for column value transformation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major refactoring of TUI functions to use orchestration pattern, achieving massive code reduction while maintaining all functionality.
Code Reduction Achievements
Architectural Improvements
try_handle_*sub-functionsupdate_vim_search_pattern)Documentation Added
Testing
This PR completes Phase 2 of the TUI refactoring, making the codebase significantly more maintainable and setting the stage for future state management improvements.
🤖 Generated with Claude Code